package com.shuai.jit.entity.vo;


import com.baomidou.mybatisplus.annotation.*;
import com.shuai.jit.entity.course.Article;
import com.shuai.jit.entity.user.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("article")
public class VoArticleUser {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("文章的内容")
    private String articleContext;

    @ApiModelProperty("文章的浏览量")
    private Integer articleViews;

    @ApiModelProperty("文章的点赞")
    private Integer articleGood;

    @ApiModelProperty("文章的踩")
    private Integer articleBad;

    @ApiModelProperty("文章的收藏数")
    private Integer articleStar;

    @ApiModelProperty("文章的标题")
    private String articleTitle;

    @ApiModelProperty("文章封面图片")
    private String articleImage;

    @ApiModelProperty("文章的标签")
    @TableField(exist = false)
    private List<String> tags;


    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @ApiModelProperty("上次创建时间")
    @TableField(fill =FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    @ApiModelProperty("乐观锁")
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @ApiModelProperty("逻辑是否删除")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    @TableField(exist = false)
    private User user;

}
